<?php
defined('BY_JYA') or exit('error');
/*
	绑定手机号
*/
$_RQ['op']=$_RQ['op']?$_RQ['op']:'main';
cfc('core')->checklogin();
if($_RQ['op']=='main'){
	$return['member']=$this->get('member',array('mid'=>$_SESSION['uid']),array('mobile'));
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	if(!$post['smscode']){
		exi('请先输入验证码！','error');
	}
	if($post['smscode']!=$_SESSION['verify_code']){
		exi('验证码输入错误！','error');
	}
	$this->update('member',array('mobile'=>$_SESSION['verify_mobile']),array('mid'=>$_SESSION['uid']));
	exi('绑定成功！','','goback');
}
